<?xml version="1.0" encoding="iso-8859-1"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
  <html xmlns="http://www.w3.org/1999/xhtml">
		<head>
			<!-- template designed by Marco Von Ballmoos -->
			<title>Docs For Class ObservationManager</title>
			<link rel="stylesheet" href="../../media/stylesheet.css" />
			<meta http-equiv='Content-Type' content='text/html; charset=iso-8859-1'/>
		</head>
		<body>
			<div class="page-body">			
<h2 class="class-name">Interface ObservationManager</h2>

<a name="sec-description"></a>
<div class="info-box">
	<div class="info-box-title">Description</div>
	<div class="nav-bar">
					<span class="disabled">Description</span> |
															<a href="#sec-method-summary">Methods</a> (<a href="#sec-methods">details</a>)
						
					</div>
	<div class="info-box-body">
        		<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">The ObservationManager object.</p>
<p class="description"><p>Level 2 only</p><p>Acquired via Ticket::getObservationManager().  Allows for the registration and deregistration of observation listeners.</p></p>
	<ul class="tags">
				<li><span class="field">copyright:</span> PHP Code Copyright &amp;copy; 2004-2005, Domain51, United States</li>
				<li><span class="field">author:</span> Travis Swicegood &lt;<a href="mailto:travis@domain51.net">travis@domain51.net</a>&gt;</li>
			</ul>
		<p class="notes">
			Located in <a class="field" href="_observation_ObservationManager_interface_php.html">/observation/ObservationManager.interface.php</a> (line <span class="field">41</span>)
		</p>
		
				
		<pre></pre>
	
			</div>
</div>




	<a name="sec-method-summary"></a>
	<div class="info-box">
		<div class="info-box-title">Method Summary</span></div>
		<div class="nav-bar">
			<a href="#sec-description">Description</a> |
												<span class="disabled">Methods</span> (<a href="#sec-methods">details</a>)
		</div>
		<div class="info-box-body">			
			<div class="method-summary">
								
				<div class="method-definition">
											<span class="method-result">void</span>
										<a href="#addEventListener" title="details" class="method-name">addEventListener</a>
											(<span class="var-type">int</span>&nbsp;<span class="var-name">$eventTypes</span>, <span class="var-type">string</span>&nbsp;<span class="var-name">$absPath</span>, <span class="var-type">int</span>&nbsp;<span class="var-name">$depth</span>, <span class="var-type">EventListener</span>&nbsp;<span class="var-name">$listener</span>, <span class="var-type">bool</span>&nbsp;<span class="var-name">$noLocal</span>, <span class="var-type">EventSelector</span>&nbsp;<span class="var-name">$selector</span>)
									</div>
								
				<div class="method-definition">
											<span class="method-result">void</span>
										<a href="#addVetoableEventListener" title="details" class="method-name">addVetoableEventListener</a>
											(<span class="var-type">int</span>&nbsp;<span class="var-name">$eventTypes</span>, <span class="var-type">string</span>&nbsp;<span class="var-name">$absPath</span>, <span class="var-type">int</span>&nbsp;<span class="var-name">$depth</span>, <span class="var-type">VetoableEventListener</span>&nbsp;<span class="var-name">$listener</span>, <span class="var-type">bool</span>&nbsp;<span class="var-name">$noLocal</span>, <span class="var-type">EventSelector</span>&nbsp;<span class="var-name">$selector</span>)
									</div>
								
				<div class="method-definition">
											<span class="method-result">void</span>
										<a href="#removeEventListener" title="details" class="method-name">removeEventListener</a>
											(<span class="var-type">EventListener</span>&nbsp;<span class="var-name">$listener</span>)
									</div>
								
				<div class="method-definition">
											<span class="method-result">void</span>
										<a href="#removeVetoableEventListener" title="details" class="method-name">removeVetoableEventListener</a>
											(<span class="var-type">VetoableEventListener</span>&nbsp;<span class="var-name">$listener</span>)
									</div>
							</div>
		</div>
	</div>		

	
	<a name="sec-methods"></a>
	<div class="info-box">
		<div class="info-box-title">Methods</div>
		<div class="nav-bar">
			<a href="#sec-description">Description</a> |
																<a href="#sec-method-summary">Methods</a> (<span class="disabled">details</span>)
						
		</div>
		<div class="info-box-body">
			<A NAME='method_detail'></A>
<a name="methodaddEventListener" id="addEventListener"><!-- --></a>
<div class="oddrow">
	
	<div class="method-header">
		<span class="method-title">addEventListener</span> (line <span class="line-number">105</span>)
	</div> 
	
	<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">Add an observation listener (parameter $listener) which  listens for the specified events that originate from the <a href="../../phpContentRepository/Item.html">Item</a> at  $absPath (including all children up to $depth,  where -1 indicates an &quot;infinite&quot; depth).</p>
<p class="description"><p>It is possible to register a listener for a path where no <a href="../../phpContentRepository/Item.html">Item</a>  currently exists.</p><p>If $noLocal is TRUE then events generated by  the owning <a href="../../phpContentRepository/Ticket.html">Ticket</a> are ignored.</p><p>To reduce the number of events an observation selector can be specified.  An observation selector discards events that aren't applicable. The  events are selected based on observation content rather than observation  type. This also enables the repository implementation to filter events  before they are dispatched, to reduce bandwidth.</p><p>The $eventSelector parameter specifies the expression used</p><p>propertyname operator value { [&quot;AND&quot; | &quot;OR&quot;] propertyname operator value}</p></p>
	<ul class="tags">
				<li><span class="field">access:</span> public</li>
				<li><span class="field">throws:</span> <a href="../../phpContentRepository/Exceptions/RepositoryException.html">RepositoryException</a>    If an error occurs.</li>
			</ul>
	
	<div class="method-signature">
		<span class="method-result">void</span>
		<span class="method-name">
			addEventListener
		</span>
					(<span class="var-type">int</span>&nbsp;<span class="var-name">$eventTypes</span>, <span class="var-type">string</span>&nbsp;<span class="var-name">$absPath</span>, <span class="var-type">int</span>&nbsp;<span class="var-name">$depth</span>, <span class="var-type">EventListener</span>&nbsp;<span class="var-name">$listener</span>, <span class="var-type">bool</span>&nbsp;<span class="var-name">$noLocal</span>, <span class="var-type">EventSelector</span>&nbsp;<span class="var-name">$selector</span>)
			</div>
	
			<ul class="parameters">
					<li>
				<span class="var-type">int</span>
				<span class="var-name">$eventTypes</span><span class="var-description">: A combination of one or more of the following constants encoded as a    bitmask value:    <ul><li><a href="../../phpContentRepository/Level2/EventType.html#constITEM_ADDED">EventType::ITEM_ADDED</a></li><li><a href="../../phpContentRepository/Level2/EventType.html#constITEM_CHANGED">EventType::ITEM_CHANGED</a></li><li><a href="../../phpContentRepository/Level2/EventType.html#constITEM_REMOVED">EventType::ITEM_REMOVED</a></li><li><a href="../../phpContentRepository/Level2/EventType.html#constITEM_VERSIONED">EventType::ITEM_VERSIONED</a></li><li><a href="../../phpContentRepository/Level2/EventType.html#constLABEL_ADDED">EventType::LABEL_ADDED</a></li><li><a href="../../phpContentRepository/Level2/EventType.html#constLABEL_REMOVED">EventType::LABEL_REMOVED</a></li><li><a href="../../phpContentRepository/Level2/EventType.html#constITEM_LOCKED">EventType::ITEM_LOCKED</a></li><li><a href="../../phpContentRepository/Level2/EventType.html#constITEM_UNLOCKED">EventType::ITEM_UNLOCKED</a></li><li><a href="../../phpContentRepository/Level2/EventType.html#constLOCK_EXPIRED">EventType::LOCK_EXPIRED</a></li></ul>    See <a href="../../phpContentRepository/Level2/EventType.html">EventType</a>.</span>			</li>
					<li>
				<span class="var-type">string</span>
				<span class="var-name">$absPath</span><span class="var-description">: Specifies the <a href="../../phpContentRepository/Item.html">Item</a> path that the listener wants to receive    events for. It is possible to register a listener for a path where no    <a href="../../phpContentRepository/Item.html">Item</a> currently exists.</span>			</li>
					<li>
				<span class="var-type">int</span>
				<span class="var-name">$depth</span><span class="var-description">: Specifies whether the registration is for the <a href="../../phpContentRepository/Item.html">Item</a> named  by    $absPath ($depth == 0), the <a href="../../phpContentRepository/Item.html">Item</a> and    its immediate children ($depth == 1), or some other depth    of tree. A depth value of -1 corresponds to an &quot;infinite depth&quot;, meaning    the entire sub-tree rooted at $absPath.</span>			</li>
					<li>
				<span class="var-type">object
 An</span>
				<span class="var-name">$listener</span><span class="var-description">: <a href="../../phpContentRepository/Level2/EventListener.html">EventListener</a> object that will &quot;do the listening&quot;.</span>			</li>
					<li>
				<span class="var-type">bool</span>
				<span class="var-name">$noLocal</span><span class="var-description">: If TRUE, supresses receipt of events generated by the    owning <a href="../../phpContentRepository/Ticket.html">Ticket</a> instance.</span>			</li>
					<li>
				<span class="var-type">object
 An</span>
				<span class="var-name">$selector</span><span class="var-description">: <a href="../../phpContentRepository/Level2/EventSelector.html">EventSelector</a> object whose <a href="../../phpContentRepository/Level2/EventSelector.html#methodaccept">EventSelector::accept()</a>    method can be used to filter events, based on their content.</span>			</li>
				</ul>
		
		
	</div>
<a name="methodaddVetoableEventListener" id="addVetoableEventListener"><!-- --></a>
<div class="evenrow">
	
	<div class="method-header">
		<span class="method-title">addVetoableEventListener</span> (line <span class="line-number">132</span>)
	</div> 
	
	<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">Same as addEventListener() except the fourth parameter is a  <a href="../../phpContentRepository/Level2/VetoableEventListener.html">VetoableEventListener</a> instead of a <a href="../../phpContentRepository/Level2/EventListener.html">EventListener</a>.</p>
	<ul class="tags">
				<li><span class="field">access:</span> public</li>
				<li><span class="field">throws:</span> <a href="../../phpContentRepository/Exceptions/RepositoryException.html">RepositoryException</a>    If an error occurs.</li>
				<li><span class="field">see:</span> <a href="../../phpContentRepository/Level2/ObservationManager.html#methodaddEventListener">ObservationManager::addEventListener()</a></li>
			</ul>
	
	<div class="method-signature">
		<span class="method-result">void</span>
		<span class="method-name">
			addVetoableEventListener
		</span>
					(<span class="var-type">int</span>&nbsp;<span class="var-name">$eventTypes</span>, <span class="var-type">string</span>&nbsp;<span class="var-name">$absPath</span>, <span class="var-type">int</span>&nbsp;<span class="var-name">$depth</span>, <span class="var-type">VetoableEventListener</span>&nbsp;<span class="var-name">$listener</span>, <span class="var-type">bool</span>&nbsp;<span class="var-name">$noLocal</span>, <span class="var-type">EventSelector</span>&nbsp;<span class="var-name">$selector</span>)
			</div>
	
			<ul class="parameters">
					<li>
				<span class="var-type">int</span>
				<span class="var-name">$eventTypes</span>			</li>
					<li>
				<span class="var-type">string</span>
				<span class="var-name">$absPath</span>			</li>
					<li>
				<span class="var-type">int</span>
				<span class="var-name">$depth</span>			</li>
					<li>
				<span class="var-type">object
 A</span>
				<span class="var-name">$listener</span><span class="var-description">: <a href="../../phpContentRepository/Level2/VetoableEventListener.html">VetoableEventListener</a> object.</span>			</li>
					<li>
				<span class="var-type">bool</span>
				<span class="var-name">$noLocal</span>			</li>
					<li>
				<span class="var-type">object</span>
				<span class="var-name">$selector</span>			</li>
				</ul>
		
		
	</div>
<a name="methodremoveEventListener" id="removeEventListener"><!-- --></a>
<div class="oddrow">
	
	<div class="method-header">
		<span class="method-title">removeEventListener</span> (line <span class="line-number">157</span>)
	</div> 
	
	<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">Unregisters an observation listener.</p>
<p class="description"><p>A listener may be unregistered while it is being executed. The  unregistration method will block until the listener has completed  executing. An exception to this rule is a listener which unregisters  itself from within the Event::onEvent() method. In this case, the  unregistration method returns immediately, but unregistration will  effectively be delayed until the listener completes.</p></p>
	<ul class="tags">
				<li><span class="field">access:</span> public</li>
				<li><span class="field">throws:</span> <a href="../../phpContentRepository/Exceptions/RepositoryException.html">RepositoryException</a>    If an error occurs.</li>
			</ul>
	
	<div class="method-signature">
		<span class="method-result">void</span>
		<span class="method-name">
			removeEventListener
		</span>
					(<span class="var-type">EventListener</span>&nbsp;<span class="var-name">$listener</span>)
			</div>
	
			<ul class="parameters">
					<li>
				<span class="var-type">object
 The</span>
				<span class="var-name">$listener</span><span class="var-description">: <a href="../../phpContentRepository/Level2/EventListener.html">EventListener</a> to unregister.</span>			</li>
				</ul>
		
		
	</div>
<a name="methodremoveVetoableEventListener" id="removeVetoableEventListener"><!-- --></a>
<div class="evenrow">
	
	<div class="method-header">
		<span class="method-title">removeVetoableEventListener</span> (line <span class="line-number">174</span>)
	</div> 
	
	<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">Deregisters a vetoable observation listener.</p>
<p class="description"><p>Same as <a href="../../phpContentRepository/Level2/ObservationManager.html#methodremoveEventListener">removeEventListener()</a> except this method's  $listener parameter is derived from  <a href="../../phpContentRepository/Level2/VetoableEventListener.html">VetoableEventListener</a>.</p></p>
	<ul class="tags">
				<li><span class="field">access:</span> public</li>
				<li><span class="field">throws:</span> <a href="../../phpContentRepository/Exceptions/RepositoryException.html">RepositoryException</a>    If an error occurs.</li>
				<li><span class="field">see:</span> <a href="../../phpContentRepository/Level2/ObservationManager.html#methodremoveEventListener">ObservationManager::removeEventListener()</a></li>
			</ul>
	
	<div class="method-signature">
		<span class="method-result">void</span>
		<span class="method-name">
			removeVetoableEventListener
		</span>
					(<span class="var-type">VetoableEventListener</span>&nbsp;<span class="var-name">$listener</span>)
			</div>
	
			<ul class="parameters">
					<li>
				<span class="var-type">object
 The</span>
				<span class="var-name">$listener</span><span class="var-description">: <a href="../../phpContentRepository/Level2/VetoableEventListener.html">VetoableEventListener</a> to unregister.</span>			</li>
				</ul>
		
		
	</div>
						
		</div>
	</div>


	<p class="notes" id="credit">
		Documentation generated on Fri, 31 Dec 2004 10:15:18 -0600 by <a href="http://www.phpdoc.org" target="_blank">phpDocumentor 1.3.0RC3</a>
	</p>
	</div></body>
</html>